package ro.dta.idbi.interfaces.sql;

/**
 * Interface for SQL columns
 * 
 * @author Tudor Dobrila
 * 
 */
public interface ISqlColumn extends ISqlConstruct {

	/**
	 * Set whether the column is a primary key or not
	 * 
	 * @param isPK
	 *            True if column is primary key, false otherwise
	 */
	void setPK(boolean isPK);

	/**
	 * @return True if column is part of the PK of the parent table, false
	 *         otherwise
	 */
	boolean isPK();

	/**
	 * Set whether the column is nullable or not
	 * 
	 * @param isNullable
	 *            True if column is nullable, false otherwise
	 */
	void setNullable(boolean isNullable);

	/**
	 * @return True if column is nullable, false otherwise
	 */
	boolean isNullable();

	/**
	 * Get the short definition of the column
	 * 
	 * @return Short definition in the form &lt;&lt;table,col&gt;&gt;
	 */
	String getShortDefinition();

	/**
	 * Get the name of the column
	 * 
	 * @return Name of the column
	 */
	String getName();

}